﻿using System;
using System.Text;

namespace HttpPublish
{
    public static class Log
    {
        private static readonly StringBuilder LogBuilder = new StringBuilder();

        public static string Logtext
        {
            get { return LogBuilder.ToString(); }
        }

        public static void Clear()
        {
            LogBuilder.Clear();
        }

        public static void Trace(string msg, params object[] values)
        {
            var line = String.Format(msg, values);
            LogBuilder.AppendLine(line + "<br>");
            Console.WriteLine(line);
        }
    }
}
